package com.manong.bookstore.message;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class test {
    public static void main(String[] args) throws ParseException {
        Date date = new Date();
        System.out.println(date);
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        String datestr = simpleDateFormat.format(date);
        System.out.println("datestr:" + datestr);
        Date date1 = simpleDateFormat.parse(datestr);
        System.out.println(date1);
    }
}
